Skip to content

AI video v2#119

Open
vaguue wants to merge 6 commits intoRule-34:mainfrom
vaguue:main
Open

AI video v2#119
vaguue wants to merge 6 commits intoRule-34:mainfrom
vaguue:main

Conversation

@vaguue
Copy link
Copy Markdown
Contributor

@vaguue vaguue commented Apr 19, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Added "Generate AI Video" action for image posts, creating videos from image content.
  • Bug Fixes & Improvements

    • Simplified post chat interface; streamlined tag handling and improved accessibility with proper ARIA attributes.
    • Updated post loading behavior to display sample data.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 19, 2026

📝 Walkthrough

Walkthrough

The pull request refactors AI video generation functionality by extracting it from PostChatWithAi into a new PostNud3 component, removes media-related props from PostChatWithAi, simplifies tag normalization logic, and updates the posts page to return hardcoded sample data instead of fetching from the API endpoint.

Changes

Cohort / File(s) Summary
AI Video Generation Refactoring
components/pages/posts/post/PostChatWithAi.vue, components/pages/posts/post/PostComponent.vue, components/pages/posts/post/PostNud3.vue
Extracted AI video generation into new PostNud3 component; removed mediaType and mediaUrl props from PostChatWithAi; updated Floating UI middleware configuration; simplified tag normalization by removing string-trimming and type filtering; consolidated template menu rendering to show either "No tags available" or tag links; adjusted icon markup with aria-hidden attributes.
Mock Data Integration
pages/posts/[domain].vue
Replaced API fetch call in fetchPosts with hardcoded IPostPage object containing 4 sample post entries; adjusted pagination metadata to reflect single-page results with no next/previous links.

Possibly related PRs

  • AI integration #118: Reverses the refactoring by reintroducing media props into PostChatWithAi and moving the AI video generation logic back into that component, directly inverting these changes.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'AI video v2' is vague and doesn't clearly describe the specific changes made. While the PR involves AI video functionality, the title lacks meaningful detail about what was actually changed or improved. Consider a more descriptive title such as 'Extract AI video generation into separate PostNud3 component' or 'Refactor AI video feature and add sample post data' to better convey the main changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

This reverts commit c2e5748.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@components/pages/posts/post/PostNud3.vue`:
- Around line 4-9: In PostNud3.vue the runtime props object created by
defineProps(...) is inconsistent with other components and the resulting props
binding (props) is unused; change to the TypeScript generic form defineProps<{
mediaUrl: string }>() so the component gets a typed mediaUrl via script-setup
auto-unwrapping, and remove the unused props variable (or replace its usage with
the unwrapped mediaUrl) to keep the file consistent with PostChatWithAi.vue and
PostComponent.vue.

In `@pages/posts/`[domain].vue:
- Around line 418-506: The current unconditional return of the hardcoded sample
object prevents the real $fetch flow from running; locate the function that
returns the object (references: selectedBooru, data/meta/links, and the later
$fetch call) and either remove this sample return or wrap it in a clear
non-production guard (e.g., check a runtime config flag like
config.public.demoMode or process.env.NODE_ENV !== 'production'); ensure that
when the flag is false the code falls through to the existing $fetch logic so
selected tags, filters, pagination, and selectedBooru are used instead of the
four static posts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 37128cbd-a0b0-4ccc-ad78-cd83cad09d33

📥 Commits

Reviewing files that changed from the base of the PR and between 1763cc7 and 2a8daf3.

📒 Files selected for processing (4)
  • components/pages/posts/post/PostChatWithAi.vue
  • components/pages/posts/post/PostComponent.vue
  • components/pages/posts/post/PostNud3.vue
  • pages/posts/[domain].vue

Comment on lines +4 to +9
const props = defineProps({
mediaUrl: {
type: String,
required: true
}
})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Use TypeScript generic defineProps for consistency.

The surrounding components (PostChatWithAi.vue, PostComponent.vue) use the type-based defineProps<{...}>() form. The runtime-only object form here is inconsistent and loses some type-narrowing benefits. The props binding is also unused — the template references mediaUrl directly via <script setup> auto-unwrapping.

♻️ Proposed refactor
-  const props = defineProps({
-    mediaUrl: {
-      type: String,
-      required: true
-    }
-  })
+  defineProps<{
+    mediaUrl: string
+  }>()
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const props = defineProps({
mediaUrl: {
type: String,
required: true
}
})
defineProps<{
mediaUrl: string
}>()
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/pages/posts/post/PostNud3.vue` around lines 4 - 9, In PostNud3.vue
the runtime props object created by defineProps(...) is inconsistent with other
components and the resulting props binding (props) is unused; change to the
TypeScript generic form defineProps<{ mediaUrl: string }>() so the component
gets a typed mediaUrl via script-setup auto-unwrapping, and remove the unused
props variable (or replace its usage with the unwrapped mediaUrl) to keep the
file consistent with PostChatWithAi.vue and PostComponent.vue.

Comment thread pages/posts/[domain].vue Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant